package cn.gzjp.modules.rice.entity;

import org.hibernate.validator.constraints.Length;

import cn.gzjp.common.persistence.DataEntity;
import cn.gzjp.common.utils.excel.annotation.ExcelField;

import java.math.BigDecimal;

/**
 * 会员管理Entity
 * @author zengcp
 * @version 2018-11-17
 */
public class RiceMember extends DataEntity<RiceMember> {
	
	private static final long serialVersionUID = 1L;
	private String nickName;		// 昵称
	private String realName;		// 姓名
	private String headImg;		// 头像
	private String mobile;		// 手机号
	private String level;		// 0普通会员1合伙人
	private BigDecimal balance;		// 账号余额
	private String inviteCode;		// 推荐人

	private int riceCoupon;// 粮票
	private int cashCoupon;// 代金券
	private int giftCard;//礼品卡
	private int friendCount;//好友数量

	private int gxRiceCoupon=0;//贡献粮票
	
	public RiceMember() {
		super();
	}

	public RiceMember(String id){
		super(id);
	}

	@Length(min=0, max=64, message="昵称长度必须介于 0 和 64 之间")
	@ExcelField(title="昵称", align=2, sort=1)
	public String getNickName() {
		return nickName;
	}

	public void setNickName(String nickName) {
		this.nickName = nickName;
	}
	
	@Length(min=0, max=64, message="姓名长度必须介于 0 和 64 之间")
	@ExcelField(title="姓名", align=2, sort=2)
	public String getRealName() {
		return realName;
	}

	public void setRealName(String realName) {
		this.realName = realName;
	}
	
	@Length(min=0, max=256, message="头像长度必须介于 0 和 256 之间")
	@ExcelField(title="头像", align=2, sort=3)
	public String getHeadImg() {
		return headImg;
	}

	public void setHeadImg(String headImg) {
		this.headImg = headImg;
	}
	
	@Length(min=0, max=11, message="手机号长度必须介于 0 和 11 之间")
	@ExcelField(title="手机号", align=2, sort=4)
	public String getMobile() {
		return mobile;
	}

	public void setMobile(String mobile) {
		this.mobile = mobile;
	}
	
	@Length(min=0, max=1, message="0普通会员1合伙人长度必须介于 0 和 1 之间")
	@ExcelField(title="0普通会员1合伙人", dictType="mem_level", align=2, sort=5)
	public String getLevel() {
		return level;
	}

	public void setLevel(String level) {
		this.level = level;
	}
	
	@ExcelField(title="账号余额", align=2, sort=6)
	public BigDecimal getBalance() {
		return balance;
	}

	public void setBalance(BigDecimal balance) {
		this.balance = balance;
	}
	
	@Length(min=0, max=32, message="推荐人长度必须介于 0 和 32 之间")
	@ExcelField(title="推荐人", align=2, sort=7)
	public String getInviteCode() {
		return inviteCode;
	}

	public void setInviteCode(String inviteCode) {
		this.inviteCode = inviteCode;
	}

	public int getRiceCoupon() {
		return riceCoupon;
	}

	public void setRiceCoupon(int riceCoupon) {
		this.riceCoupon = riceCoupon;
	}

	public int getCashCoupon() {
		return cashCoupon;
	}

	public void setCashCoupon(int cashCoupon) {
		this.cashCoupon = cashCoupon;
	}

	public int getGiftCard() {
		return giftCard;
	}

	public void setGiftCard(int giftCard) {
		this.giftCard = giftCard;
	}

	public int getFriendCount() {
		return friendCount;
	}

	public void setFriendCount(int friendCount) {
		this.friendCount = friendCount;
	}

	public int getGxRiceCoupon() {
		return gxRiceCoupon;
	}

	public void setGxRiceCoupon(int gxRiceCoupon) {
		this.gxRiceCoupon = gxRiceCoupon;
	}
}